/**
 * An object class represents Deanery
 * 
 * @param address
 *            Deanery address
 * @param phone
 *            Deanery phone number
 * @author Timur Suleimanov
 */
class Deanery {
	private String address;
	private String phoneNumber;

	public Deanery(String address, String phone) {
		this.address = address;
		this.phoneNumber = phone;
	}

	public String getDeaneryAddress() {
		return address;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public String setDeaneryaddress(String address) {
		return this.address = address;
	}

	public String setPhoneNumber(String phoneNumber) {
		return this.phoneNumber = phoneNumber;
	}

	/**
	 * Displays the working program
	 * 
	 * @param examSubject
	 *            academic discipline
	 */
	public void printCurriculum(Subject[] examSubject) {
		System.out.println("Curriculum:");
		for (Subject currentSubject : examSubject) {
			System.out.printf("Subject is \"%s\", hours = %s\n",
					currentSubject.getSubjectName(),
					currentSubject.getSubjectHours());
		}
	}

	public Group addGroup(String groupName) {
		return new Group(groupName);
	}

}